import { dictKeyList } from './modules/dict'

const getters = {
  userInfo: state => state.user,
  token: state => state.user.token,
  visitPatrolDetail: state => state.routerParams.visitPatrolDetail,
  visitPatrolLogDetail: state => state.routerParams.visitPatrolLogDetail,
  riskAssessmentDetail: state => state.routerParams.riskAssessmentDetail,
  personReportDetail: state => state.routerParams.personReportDetail
}

dictKeyList.forEach(key => (getters[key] = state => state.dict[key]))

export default getters
